package top.frsf.envir;

import top.frsf.GameObject;
import top.frsf.GamePanel;

import java.awt.*;

/**
 * @BelongsProject: TankWar1
 * @BelongsPackage: top.frsf.envir
 * @Author: FRSF
 * @CreateTime: 2022-09-04  10:42
 * @Description: 围墙元素
 * @Version: 1.0
 */
public class Wall extends GameObject {
    // 尺寸
    int wight = 60;
    int height = 60;


    public Wall(String img, int x, int y, GamePanel gamePanel) {
        super(img, x, y, gamePanel);
    }

    @Override
    public void paintSelf(Graphics g) {
        g.drawImage(img, x, y, null);
    }

    @Override
    public Rectangle getRec() {
        return new Rectangle(x, y, wight, height);
    }
}
